<template>
<div> 
 <p>这是Demo组件</p>
 <button @click="showHelloMsg">点击弹窗</button>
</div>
</template>

<script>
   export default {
        name:  '',
        components: {},
        //props:['msg','text'],
        // mounted(){
        //   console.log('vc实例',this);
          
        // },
        emits:['hello'],
        setup(props,context){
          console.log('---setup',props);
          console.log('---setup',context.attrs); //相当于vue2中的 $attrs
          console.log('---setup',context.emit);
          console.log('---setup',context.slots);
          

          function showHelloMsg(){
            context.emit('hello',111111);
          }

          return {
            showHelloMsg,
          }
        }
   }
</script>

<style scoped>

</style>
